<%= form_for @note do |f| %>
  <%= render "shared/error_messages", target: @note %>

  <div class="edit-tools">
    <%= render "/shared/editor_toolbar" %>
  </div>

  <div class="form-group">
    <%= f.text_area :body, rows: 20, class: 'form-control topic-editor' %>

    <p class="help-block">
      请用 <a href="/markdown" target="_blank">Markdown</a> 格式编写。
    </p>
  </div>

  <div class="form-group form-check">
    <%= f.check_box :publish, class: "form-check-input" %>
    <label class="form-check-label" for="note_publish"> 公开 <span class="text-danger"><i class="fa fa-warning"></i> 除非你选择公开，否则此 Note 的所有内容将是保密的！<span></label>
  </div>

  <div class="form-actions">
    <div class="row">
      <div class="col-sm-3">
        <%= f.submit "保存", class: "btn btn-primary btn-block", 'data-disable-with' => "保存中..." %>
      </div>
      <div class="col-sm-2">
        <%= link_to "取消", notes_path, class: "btn btn-default btn-block" %>
      </div>
    </div>
  </div>
<% end %>
